package cn.com.dhee.springcloudtraining.user.api;

import cn.com.dhee.springcloudtraining.user.api.qo.UserQO;
import cn.com.dhee.springcloudtraining.user.api.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author ralphwong
 */
@FeignClient("training-user")
public interface UserServiceFeign {

    @GetMapping(value = "/user/{id}")
    UserVO get(@PathVariable("id") Long userId);

    @PostMapping(value = "/user/save")
    UserVO save(UserQO userQO);

    @PostMapping(value = "/user/list")
    List<UserVO> list(@RequestBody UserQO userQO);
}
